import java.util.Scanner;

public class Demo7 {
    static boolean flag = true;
    public static void main(String[] args) {

        Thread t = new Thread(()->{
            while (flag){
                System.out.println("Thread is running");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });
        t.start();
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        if (n == 0) flag = false;}
}
